package com.ruoyi.amuse.comments.service.impl;

import com.ruoyi.amuse.comments.domain.PostComments;
import com.ruoyi.amuse.comments.mapper.PostCommentsMapper;
import com.ruoyi.amuse.comments.service.IPostCommentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 评论管理Service业务层处理
 * 
 * @author juwujie
 * @date 2024-07-19
 */
@Service
public class PostCommentsServiceImpl implements IPostCommentsService 
{
    @Autowired
    private PostCommentsMapper postCommentsMapper;

    /**
     * 查询评论管理
     * 
     * @param commentId 评论管理主键
     * @return 评论管理
     */
    @Override
    public PostComments selectPostCommentsByCommentId(Long commentId)
    {
        return postCommentsMapper.selectPostCommentsByCommentId(commentId);
    }

    /**
     * 查询评论管理列表
     * 
     * @param postComments 评论管理
     * @return 评论管理
     */
    @Override
    public List<PostComments> selectPostCommentsList(PostComments postComments)
    {
        return postCommentsMapper.selectPostCommentsList(postComments);
    }

    /**
     * 新增评论管理
     * 
     * @param postComments 评论管理
     * @return 结果
     */
    @Override
    public int insertPostComments(PostComments postComments)
    {
        return postCommentsMapper.insertPostComments(postComments);
    }

    /**
     * 修改评论管理
     * 
     * @param postComments 评论管理
     * @return 结果
     */
    @Override
    public int updatePostComments(PostComments postComments)
    {
        return postCommentsMapper.updatePostComments(postComments);
    }

    /**
     * 批量删除评论管理
     * 
     * @param commentIds 需要删除的评论管理主键
     * @return 结果
     */
    @Override
    public int deletePostCommentsByCommentIds(Long[] commentIds)
    {
        return postCommentsMapper.deletePostCommentsByCommentIds(commentIds);
    }

    /**
     * 删除评论管理信息
     * 
     * @param commentId 评论管理主键
     * @return 结果
     */
    @Override
    public int deletePostCommentsByCommentId(Long commentId)
    {
        return postCommentsMapper.deletePostCommentsByCommentId(commentId);
    }
}
